package com.lzy.tricbuild4_ac_hash;

import java.util.HashMap;

/**
 * @ClassName:   AcHashNode
 * @Author:      Li ZhenYong
 * @description:  ac 树结点。
 * @Date:        2022-04-05 22:52
 * @Version:  1.0
 */
public class AcHashNode {
	public String data;
	public HashMap<String, AcHashNode> children = new HashMap<>(); // 字符集只包含a~z这26个字符
	public boolean isEndingChar = false; // 结尾字符为true
	public int length = -1; // 当isEndingChar=true时，记录模式串长度
	public AcHashNode fail; // 失败指针 -》与KMP类似
	public AcHashNode(String data) {
		this.data = data;
	}
}
